<?php
    $top_menu_1 = FALSE;
    $top_menu_2 = FALSE;
    $top_menu_3 = FALSE;
    $top_menu_4 = TRUE;
    $top_menu_5 = FALSE;
    $top_menu_6 = FALSE;
    $top_menu_7 = FALSE;
    include('header.php');
    include('sidebar2.php');
    
    if(!isset($_GET['id'])){
        redirect('news-event.php');
    }
    
    $news_id = $_GET['id'];
    
    $sql = "SELECT * FROM hs_news WHERE news_id=$news_id";
    $news_info = $db->queryUniqueObject($sql);
    
    if($news_info->news_img!='' AND file_exists(APPPATH.'/images/news/'.$news_info->news_id.'/'.$news_info->news_img)){
        $newImg = URL.'/images/news/'.$news_info->news_id.'/'.$news_info->news_img;
    }else{
        $newImg = URL.'/images/noimg.jpg';
    }
?>
            <div id="main_content" class="news_content">
                <img src="images/news_title.jpg" alt="News & Event" id="news_title" />
                
                <div id="news_img">
                    <img src="<?php echo $newImg; ?>" alt="<?php echo $news_info->news_title; ?>" />
                    <h2><?php echo $news_info->news_title; ?></h2>
                    <p><?php echo date('d.m.Y',$news_info->news_date); ?></p>
                </div>
                <div id="news_detail">
                    <?php echo $news_info->news_detail; ?>
                </div>
                
            </div>
            <div class="clear">&nbsp;</div>
<?php
    include('footer.php');
?>
